<template>
	<view>
		<view v-if="titledata.content[0].editable">
			<view style="padding: 8px 10px;color: #666;font-size: 14px; display: flex;flex-direction: row;height: 100px;width: calc(100vw - 30px);" >
				<textarea style="width: calc(100vw - 30px);height: 100px;" maxlength="-1" :value="titledata.content[0].colvalue" :placeholder="titledata.content[0].placeholder"  @input="inputitem($event)"></textarea>
			</view>
		</view>			   
		<view v-else>
			<text decode="true" style=" color: #666; font-size: 14px; white-space:pre-wrap;width: calc(100vw - 30px);">{{titledata.content[0].coltext}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			titledata:{
				type:Object
			},
			index:{
				type:Number
			}
		},
		methods:{
			inputitem(event){
				var that = this
				var inputvalue = event.detail.value
				that.titledata.content[0].colvalue = inputvalue
				that.titledata.content[0].coldisplay = inputvalue
				that.titledata.content[0].ismodified = true
				that.$emit('changeListData',that.index,that.titledata)
			},
		}
	}
</script>

<style>
</style>
